119
119
DOI: 10.1201/9781003214335-9
Shaping up
Analyze a Picture and
Document Its Components
in Text
Sometimes we are faced with the opposite problem of what we saw in Chapter 6. We
have a beautiful visual which lays it all out. But someone needs it in a spreadsheet
form. This is especially useful for auditors who are trying to review a diagram for
accuracy and completeness. Getting it on a spreadsheet opens up many possibilities
of checking certain attributes of the data automatically that can otherwise only be
verified through visual examination. For example, if we know that all process names
must exceed ten characters, then it would be very beneficial to change the processes
in a diagram to a spreadsheet in a long list and apply a formula to test if any of the
process names exceeds ten characters. If we did not do that then the only way would
be to pore over the diagram and count the letters manually in each process box.
This chapter is going to show you how you can do this conversion—from diagram
to spreadsheet—so that you can apply your own formulas to the result when required.
8.1 THE ALGORITHM
The program is developed in three steps.
Step 1.
Collect all the different types of shapes that are possible on Excel. Since Excel
uses a tool called MSDraw, it is easy to get this list from the Microsoft website.
Shape is an object and there are two attributes that are essential in discovering
them. These are Shape Type and AutoShape Type. The second attribute is
really a qualifier of a shape that is already defined to be an AutoShape (Shape
Type = “AutoShape”). Shapes can be of many types such as line, arrow, connec
tions, pictures, comments, and so on. AutoShapes are those that have the ability
to house text inside them and grow in size as required to fit this text—think rect
angle, oval, triangle, etc.
8